export const request=(params)=>{
    // 定义公共的url
    const baseUrl="https://dogborther.top/"
    // const baseUrl="http://5x42011255.imdo.co/"
    const token = wx.getStorageSync('token')
    return new Promise((resolve,reject)=>{
        wx.request({
            ...params,
            header:{
                token: token
            },
            url:baseUrl+params.url,
            success:(result)=>{
                
                resolve(result);
            },
            fail:(err)=>{
                reject(err);
            }
        });
    }
    )
}